// pages/wyyIndex/wyyIndex.js
const {hotMusic,newMusic,djMusic} = require("../../models/wyyIndex")
const {titles,icons} = require("../../static/data")
Page({
  data: {
    lists:[]
  },
  onLoad: async function (options) {
    let https = [hotMusic,newMusic,djMusic]
    var lists={}
    for(let item of https){
      let res = await item();
      lists[item.name] = {
        res:res.data.playlists.slice(0,3),
        title:titles[item.name],
        iconUrl:icons[item.name]
      }
    }
    this.setData({
      lists
    })
    console.log(this.data.lists);
  },
})